#!/bin/sh

info()
{
	#获取CPU核心温度(r7800测试正常)(已知竟斗云，N1无法获取温度，强迫症可以换回我之前的index.htm文件)
	sen=`sensors | grep  'temp1'  | sed -n '1p' | cut -c10-24` 
	sen_na=`sensors | grep  'N/A' | sed -n '1p' | wc -l`
	cut_temp=`cut -c1-2 /sys/class/thermal/thermal_zone0/temp`
	symbol=`echo "°C"`

	if [ "$sen_na" == "1" ];then
		$cut_temp
		if [[ $? -eq 0 ]]; then
			a=$cut_temp$symbol
		else
			a="Not Support"
		fi
	else
		a=$sen
	fi
}

out()
{
	info
	echo " $a "
}

out
